home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / doc / set.n < prev    next >
Text File  |  1993-06-07  |  2KB  |  52 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/set.n,v 1.1 93/06/07 16:48:27 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS set tcl
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. set \- Read and write variables
  29. .SH SYNOPSIS
  30. \fBset \fIvarName \fR?\fIvalue\fR?
  31. .BE
  32.  
  33. .SH DESCRIPTION
  34. .PP
  35. Returns the value of variable \fIvarName\fR.
  36. If \fIvalue\fR is specified, then set
  37. the value of \fIvarName\fR to \fIvalue\fR, creating a new variable
  38. if one doesn't already exist, and return its value.
  39. If \fIvarName\fR contains an open parenthesis and ends with a
  40. close parenthesis, then it refers to an array element:  the characters
  41. before the first open parenthesis are the name of the array, and the characters
  42. between the parentheses are the index within the array.
  43. Otherwise \fIvarName\fR refers to a scalar variable.
  44. If no procedure is active, then \fIvarName\fR refers to a global
  45. variable.
  46. If a procedure is active, then \fIvarName\fR refers to a parameter
  47. or local variable of the procedure unless the \fIglobal\fR command
  48. has been invoked to declare \fIvarName\fR to be global.
  49.  
  50. .SH KEYWORDS
  51. read, write, variable
  52.